<template>
	<view class="page">
		<view class="container">
			<!-- 顶部用户信息区域 -->
			<view class="header">
				<u-avatar :src="src" size="50" shape="square" style="margin-left: 30px;"></u-avatar>
				<view style="width: 20px;"></view>
				<text style="color: white;">测试账户</text>
			</view>
			
			<!-- 分隔条 -->
			<view class="divider"></view>
			
			<!-- 第一组选项 -->
			<view>
				<u-cell-group>
					<u-cell :isLink="true" icon="account" title="个人资料" :right-icon="rightIcon" @click="ziliao"></u-cell>
					<u-cell :isLink="true" icon="photo" title="个人动态" :right-icon="rightIcon" @click="zhuangtai"></u-cell>
					<u-cell :isLink="true" icon="chat" title="消息" :right-icon="rightIcon"></u-cell>
				</u-cell-group>
			</view>
			
			<!-- 分隔条 -->
			<view class="divider"></view>
			
			<!-- 第二组选项 -->
			<view>
				<u-cell-group>
					<u-cell :isLink="true" icon="setting" title="设置"></u-cell>
					<u-cell :isLink="true" icon="thumb-up" title="反馈"></u-cell> <!-- 修改为大拇指图标 -->
					<u-cell :isLink="true" icon="info-circle" title="关于"></u-cell>
				</u-cell-group>
			</view>
			
			<!-- 分隔条 -->
			<view class="divider"></view>
			
			<!-- 退出账号（添加点击事件） -->
			<view>
				<u-cell-group>
					<u-cell icon="close" title="退出账号" @click="logout"></u-cell>
				</u-cell-group>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				src: "http://n.sinaimg.cn/sinakd10109/530/w700h630/20200630/9983-ivrxcex5287317.jpg",
			}
		},
		methods: {
			
			logout() {
			
				uni.reLaunch({
					url: '/pages/index/index'
				});
			},
			zhuangtai(){
				uni.reLaunch({
					url: '/pages/Demo5/Demo5'
				});
			},
			ziliao(){
				uni.reLaunch({
					url: '/pages/Demo6/Demo6'
				});
			}
		}
	}
</script>

<style>
	page, .page {
		height: 100%;
		background-color: rgb(247,247,247);
	}
	body, html {
		height: 100%;
		background-color: rgb(247,247,247);
	}
	
	.container {
		width: 100%;
		height: 100%;
	}
	
	.header {
		display: flex;
		align-items: center;
		width: 100%;
		height: 200rpx; /* 使用固定高度代替百分比 */
		background-color: rgb(100,138,221);
	}
	
	.divider {
		width: 100%;
		height: 10px;
		background-color: white;
	}

</style>